package com.woniu.supermarket.mapper;

import com.woniu.supermarket.vo.StockTakingVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StockTakingMapper {
    List<StockTakingVo> selectByStockId(@Param("code")String code,@Param("status")Integer status);

    @Delete("delete from stock_taking where id = #{id}")
    int deleteStockTakingById(@Param("id")Integer id);

    List<StockTakingVo> selectGoodsByStockId(@Param("sid")Integer sid);

    @Update("update stock_taking set status = #{status} where code = #{code}")
    int updateByCode(@Param("status") Integer status,@Param("code") String code);
}
